#kq = 1 if n is prime, 0 the other way.

#move n into i, j, k for later use 

while n not 0 do;
	incr k;
	incr ka;
	decr n;
end;

incr nlet_two;
incr nlat_two;

clear n_is_two;
incr two;
incr two;

#check k <= 2
while ka not 0 do; #two = two - k
	decr ka;
	decr two;
end;
while two not 0 do; #two = two - k > 0 <=> k < 2
	clear nlet_two;

	clear two;
end;


clear two;
incr two;
incr two;

#check k >= 2
while two not 0 do; #k = k - 2
	decr k;
	decr two;
end;
while k not 0 do; #k - 2 >= 0 <=> k >=2
	clear nlat_two;

	clear k;
end;

while nlet_two not 0 do;
	while nlat_two not 0 do;
		clear n_is_two;
		incr n_is_two;		

		clear nlat_two;
	end;
	clear nlet_two;
end;
